package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.system.domain.RentalSysVehicle;
import com.ruoyi.system.mapper.RentalSysVehicleMapper;
import com.ruoyi.system.service.IRentalSysVehicleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 车辆Service业务层处理
 * 
 * @author Mag1c_-xyy
 * @date 2024-04-21
 */
@Service
public class RentalSysVehicleServiceImpl implements IRentalSysVehicleService
{
    @Autowired
    private RentalSysVehicleMapper rentalSysVehicleMapper;

    /**
     * 查询车辆
     * 
     * @param vehicleId 车辆主键
     * @return 车辆
     */
    @Override
    public RentalSysVehicle selectRentalSysVehicleByVehicleId(Long vehicleId)
    {
        return rentalSysVehicleMapper.selectRentalSysVehicleByVehicleId(vehicleId);
    }

    /**
     * 查询车辆列表
     * 
     * @param rentalSysVehicle 车辆
     * @return 车辆
     */
    @Override
    public List<RentalSysVehicle> selectRentalSysVehicleList(RentalSysVehicle rentalSysVehicle)
    {
        return rentalSysVehicleMapper.selectRentalSysVehicleList(rentalSysVehicle);
    }

    /**
     * 新增车辆
     * 
     * @param rentalSysVehicle 车辆
     * @return 结果
     */
    @Override
    public int insertRentalSysVehicle(RentalSysVehicle rentalSysVehicle)
    {
        return rentalSysVehicleMapper.insertRentalSysVehicle(rentalSysVehicle);
    }

    /**
     * 修改车辆
     * 
     * @param rentalSysVehicle 车辆
     * @return 结果
     */
    @Override
    public int updateRentalSysVehicle(RentalSysVehicle rentalSysVehicle)
    {
        return rentalSysVehicleMapper.updateRentalSysVehicle(rentalSysVehicle);
    }

    /**
     * 批量删除车辆
     * 
     * @param vehicleIds 需要删除的车辆主键
     * @return 结果
     */
    @Override
    public int deleteRentalSysVehicleByVehicleIds(Long[] vehicleIds)
    {
        return rentalSysVehicleMapper.deleteRentalSysVehicleByVehicleIds(vehicleIds);
    }

    /**
     * 删除车辆信息
     * 
     * @param vehicleId 车辆主键
     * @return 结果
     */
    @Override
    public int deleteRentalSysVehicleByVehicleId(Long vehicleId)
    {
        return rentalSysVehicleMapper.deleteRentalSysVehicleByVehicleId(vehicleId);
    }
}
